package improve;

import java.io.BufferedReader;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.HashSet;
import java.util.Set;

public class Promotion {
    public static void main(String[] args) {
        //定义一个集合，Set特点: 无序，不可重复
        Set<String> lines = new HashSet<>();
        try(BufferedReader br = Files.newBufferedReader(Paths.get("day13-code/src/improve/Promotion.java"));)
        {
            String line = null;
            while((line = br.readLine()) != null){
                lines.add(line);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println("去重后的行数为："+lines.size());
    }
}
